package livingarea.Members;

import livingarea.LivingArea;
import livingarea.actions_impl.GreeneryDeath;
import livingarea.actions_impl.GreenerySpawn;

/**
 *
 * @author Muzalevskiy Vitaliy
 */
public class Greenery extends NonLivingMember {
    
    /**Number of iterations current area member lives.*/
    public static final int DEATH_TIME = 100;
    /**How many moves need fish to do before spawning.*/
    public static final int CYCLES_TO_SPAWN = 30;
    public static final int MAX_SPAWN_RADIUS = 10;
    
    public Greenery(LivingArea livingArea) {
        super(livingArea);
        spawnType = new GreenerySpawn(this);
        dethType = new GreeneryDeath(this);
    }

    public Greenery(LivingArea livingArea, Position position) {
        super(livingArea, position);
        spawnType = new GreenerySpawn(this);
        dethType = new GreeneryDeath(this);
    }

    @Override
    public void lifeCicle() {
        spawnType.spawn();
        dethType.die();
        increaseLifeCount();
    }   
    
}
